﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LitJson;

namespace SkillSystem
{
    public class DamageReduceHPSolver : DamageResultSolverBase
    {
        public override void SolveData(ISkillReceiver receiver,JsonData data)
        {
            float reduceValue = data[SkillDefines.Args][SkillDefines.ReduceValue].AsFloat;
            if (receiver is IReduceHPAble)
            {
                ((IReduceHPAble)receiver).ReduceHP(reduceValue);
            }
            else
            {
                DebugUtils.LogError("该技能接收器未实现减少HP的接口");
            }
        }
    }
}
